/*
 * ttbqt - A teletekst browser
 * http://code.google.com/p/ttbqt
 * Copyright (C) 2011, Kevin van der Vlist
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

#include "HelpBox.h"

/**
 * \class HelpBox
 *
 * \short Display the help popup box
 *
 * This shows the help popup box
 */

/**
 * \short Used to show the help file. 
 * 
 * \param bb Pointer to the buttonbar
 *
 * Show a QMessageBox with a popup with help info
 */

void HelpBox::showHelp(ButtonBar *bb) {
  QString controls = QString(tr("Controls:\nNext page \t\t %1\nPrevious page \t %2\nNext subpage \t %3\nPrevious subpage \t %4\nQuit \t\t %5")).arg(BUTTON_PREV).arg(BUTTON_NEXT).arg(BUTTON_DOWN).arg(BUTTON_UP).arg(BUTTON_QUIT);
  QString pchoice = QString(tr("Directly going to page 123: [%1][1][2][3].").arg(PAGE_SELECTOR));
  QString text = QString(tr("%1\nVersion %2\n\n%3\n%4\n\n%5\n\n%6")).arg(USER_AGENT).arg(VERSION_NUMBER).arg(LICENCE).arg(PROJECT_URL).arg(controls).arg(pchoice);
  QMessageBox::about(bb->parentWidget(), QString(APPNAME), text);
}
